package com.xuhuan.client.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author huan.xu
 * @Date 2022/6/13 11:11
 * @Description 配置类
 */
@Configuration
public class CustomeWebConfiguration implements WebMvcConfigurer {

  @Override
  public void addResourceHandlers(ResourceHandlerRegistry registry) {
    registry
        // 映射 /static 的请求到 classpath 下的 static 目录
        .addResourceHandler("/static/**").addResourceLocations("classpath:/static/");

  }
}
